\contentsline {chapter}{\numberline {1}Flink流处理简介}{1}{chapter.1}%
\contentsline {section}{\numberline {1.1}主要内容}{1}{section.1.1}%
\contentsline {section}{\numberline {1.2}Flink是什么}{1}{section.1.2}%
\contentsline {section}{\numberline {1.3}Flink目前在国内企业的应用}{1}{section.1.3}%
\contentsline {section}{\numberline {1.4}为什么选择Flink}{1}{section.1.4}%
\contentsline {section}{\numberline {1.5}哪些行业需要处理流数据}{2}{section.1.5}%
\contentsline {section}{\numberline {1.6}传统数据处理架构}{3}{section.1.6}%
\contentsline {subsection}{\numberline {1.6.1}OLTP}{3}{subsection.1.6.1}%
\contentsline {subsection}{\numberline {1.6.2}OLAP}{3}{subsection.1.6.2}%
\contentsline {subsection}{\numberline {1.6.3}LAMBDA架构}{3}{subsection.1.6.3}%
\contentsline {section}{\numberline {1.7}大数据的发展}{4}{section.1.7}%
\contentsline {section}{\numberline {1.8}有状态的流处理}{4}{section.1.8}%
\contentsline {section}{\numberline {1.9}流处理的演变}{5}{section.1.9}%
\contentsline {section}{\numberline {1.10}Flink的主要特点}{5}{section.1.10}%
\contentsline {section}{\numberline {1.11}事件驱动（Event Driven）}{6}{section.1.11}%
\contentsline {section}{\numberline {1.12}基于流的世界观}{6}{section.1.12}%
\contentsline {section}{\numberline {1.13}分层API}{7}{section.1.13}%
\contentsline {section}{\numberline {1.14}Flink中最重要的三个核心概念}{7}{section.1.14}%
\contentsline {section}{\numberline {1.15}分布式系统重要概念}{7}{section.1.15}%
\contentsline {section}{\numberline {1.16}Flink vs Spark Streaming}{8}{section.1.16}%
\contentsline {section}{\numberline {1.17}Flink程序的典型结构}{8}{section.1.17}%
\contentsline {chapter}{\numberline {2}Flink运行时架构}{9}{chapter.2}%
\contentsline {section}{\numberline {2.1}HDFS主从架构}{9}{section.2.1}%
\contentsline {section}{\numberline {2.2}Spark主从架构}{9}{section.2.2}%
\contentsline {section}{\numberline {2.3}Flink主从架构}{9}{section.2.3}%
\contentsline {section}{\numberline {2.4}作业管理器}{9}{section.2.4}%
\contentsline {section}{\numberline {2.5}任务管理器}{10}{section.2.5}%
\contentsline {section}{\numberline {2.6}任务插槽}{11}{section.2.6}%
\contentsline {section}{\numberline {2.7}并行度的设置}{11}{section.2.7}%
\contentsline {section}{\numberline {2.8}并行度设置的最佳实践}{11}{section.2.8}%
\contentsline {section}{\numberline {2.9}任务提交流程}{11}{section.2.9}%
\contentsline {section}{\numberline {2.10}Flink中的DAG数据结构}{11}{section.2.10}%
\contentsline {chapter}{\numberline {3}DataStream API}{13}{chapter.3}%
\contentsline {section}{\numberline {3.1}自定义数据源}{13}{section.3.1}%
\contentsline {subsection}{\numberline {3.1.1}POJO CLASS}{13}{subsection.3.1.1}%
\contentsline {subsection}{\numberline {3.1.2}SourceFunction}{13}{subsection.3.1.2}%
\contentsline {section}{\numberline {3.2}基本转换算子}{13}{section.3.2}%
\contentsline {section}{\numberline {3.3}逻辑分区算子}{13}{section.3.3}%
\contentsline {subsection}{\numberline {3.3.1}reduce算子如何维护逻辑分区}{14}{subsection.3.3.1}%
\contentsline {section}{\numberline {3.4}物理分区算子}{14}{section.3.4}%
\contentsline {section}{\numberline {3.5}富函数}{15}{section.3.5}%
\contentsline {section}{\numberline {3.6}自定义输出}{15}{section.3.6}%
\contentsline {chapter}{\numberline {4}底层API}{16}{chapter.4}%
\contentsline {section}{\numberline {4.1}ProcessFunction}{16}{section.4.1}%
\contentsline {section}{\numberline {4.2}KeyedProcessFunction}{16}{section.4.2}%
\contentsline {section}{\numberline {4.3}逻辑分区维护的状态-键控状态变量}{17}{section.4.3}%
\contentsline {subsection}{\numberline {4.3.1}ValueState-值状态变量}{17}{subsection.4.3.1}%
\contentsline {subsection}{\numberline {4.3.2}ListState-列表状态变量}{18}{subsection.4.3.2}%
\contentsline {subsection}{\numberline {4.3.3}MapState-字典状态变量}{18}{subsection.4.3.3}%
\contentsline {section}{\numberline {4.4}ProcessWindowFunction}{18}{section.4.4}%
\contentsline {subsection}{\numberline {4.4.1}AggregateFunction}{19}{subsection.4.4.1}%
\contentsline {subsection}{\numberline {4.4.2}将AggregateFunction和ProcessWindowFunction结合使用}{19}{subsection.4.4.2}%
\contentsline {section}{\numberline {4.5}窗口的底层实现}{19}{section.4.5}%
\contentsline {subsection}{\numberline {4.5.1}增量聚合函数和全窗口聚合函数结合使用的底层实现}{19}{subsection.4.5.1}%
\contentsline {subsection}{\numberline {4.5.2}全窗口聚合函数的底层实现}{19}{subsection.4.5.2}%
\contentsline {section}{\numberline {4.6}ProcessAllWindowFunction}{20}{section.4.6}%
\contentsline {chapter}{\numberline {5}窗口}{21}{chapter.5}%
\contentsline {section}{\numberline {5.1}窗口的本质}{21}{section.5.1}%
\contentsline {section}{\numberline {5.2}窗口概念}{21}{section.5.2}%
\contentsline {section}{\numberline {5.3}窗口类型}{21}{section.5.3}%
\contentsline {section}{\numberline {5.4}滚动窗口}{21}{section.5.4}%
\contentsline {section}{\numberline {5.5}滑动窗口}{21}{section.5.5}%
\contentsline {section}{\numberline {5.6}会话窗口}{23}{section.5.6}%
\contentsline {chapter}{\numberline {6}逻辑时钟-水位线}{24}{chapter.6}%
\contentsline {section}{\numberline {6.1}有关水位线的一些约定}{24}{section.6.1}%
\contentsline {section}{\numberline {6.2}水位线设置的最佳实践}{25}{section.6.2}%
\contentsline {section}{\numberline {6.3}Kafka水位线设置}{25}{section.6.3}%
\contentsline {section}{\numberline {6.4}如何处理迟到元素}{25}{section.6.4}%
\contentsline {section}{\numberline {6.5}如何处理迟到数据}{26}{section.6.5}%
\contentsline {chapter}{\numberline {7}多流合并}{27}{chapter.7}%
\contentsline {chapter}{\numberline {8}Flink中的状态管理}{28}{chapter.8}%
\contentsline {section}{\numberline {8.1}状态后端}{28}{section.8.1}%
\contentsline {section}{\numberline {8.2}选择一个状态后端}{28}{section.8.2}%
\contentsline {chapter}{\numberline {9}Flink的容错机制}{29}{chapter.9}%
\contentsline {chapter}{\numberline {10}端到端一致性}{30}{chapter.10}%
\contentsline {chapter}{\numberline {11}背压问题}{31}{chapter.11}%
\contentsline {chapter}{\numberline {12}有限状态机}{32}{chapter.12}%
\contentsline {chapter}{\numberline {13}竞争状态和锁机制}{33}{chapter.13}%
